home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1992-06-30 | 41.6 KB | 1,190 lines
C.S.M.P. Digest Fri, 15 May 92 Volume 1 : Issue 82 Today's Topics: Think C & 68k cross compiling FAQ index ? How about powerbook's interrupt&reset KEYS How to write a WDEF Comparing APPLs and BPPLs discipline MacTCP - UDPRead aligned? Dithering Palette How about C.S.M.P on CD-ROM? LISP and DrawString questions Cdent, where do I find it ? Silly question about determining DirIDs The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly. These digests are available (by using FTP, account anonymous, your email address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon. edu. This is also the home of the comp.sys.mac.programmer Frequently Asked Questions list. The last several issues of the digest are available from sumex-aim.stanford.edu as well. These digests are also available via email. Just send a note saying that you want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will automatically receive each new digest as it is created. The digest is a collection of articles from the internet newsgroup comp.sys. mac.programmer. It is designed for people who read c.s.m.p. semi-regularly and want an archive of the discussions. If you don't know what a newsgroup is, you probably don't have access to it. Ask your systems administrator(s) for details. (This means you can't post questions to the digest.) The articles in these digests are taken directly from comp.sys.mac.programmer. They are not edited; all articles included in this digest are in their original posted form. The only articles that are -not- included in these digests are those which didn't receive any replies (except those that give information rather than ask a question). All replies to each article are concatenated onto the original article in the order in which they were received. Article threads are not added to the digests until the last article added to the thread is at least one month old (this is to ensure that the thread is dead before adding it to the digests). Send administrative mail to mkelly@cs.uoregon.edu. ------------------------------------------------------- From: james@ee.uts.edu.au (A. James Boswell) Subject: Think C & 68k cross compiling Date: 13 Apr 92 23:41:10 GMT Organization: University of Technology, Sydney, Australia Sorry, this is a repost, cause the title wasn't accurate.... Hello, Can anyone help me with info about compiling for non Mac 68K based systems using ThinkC 5.0 or a C++ compiler? I own ThinkC 5.0 and I have to write some code for a 68332 based robot. (68332 is a superset of 68K with some 020 instructions). My (many) questions are these : Is there a utility for stripping CODE resources of JUMP tables, and locating code at a specific address (say for moving code to a ROM)? Is there a way to ensure that no system (OS, ROM or otherwise) code is called when Think C compiles it? What exactly does A5 point to when a application is first launched ? Could someone explain (in more detail than the manual) the format of CCOD resources and how I could use them to produce code for a non Mac target. And finally, is there a C++ (or some object extended C compiler) I can use with an option for non Mac targets to save mucking around. (And has anyone ported gnu g++ to a MAC (not AUX) ? I know GNU aren't real fond of Apple but if its been done that would be fab.) I am planning to use the Mac to download the code to the target, so I may write an app which loads its own resources, strips its jump table and spits itself out the serial port. If this is useful to others, I'll make it PD. All that said (asked) I am doing all this for my undergrad thesis and there are only 8 weeks left so I really need urgent info. Please help. Many thanks, A. James Boswell. A. James Boswell _--_|\ PO BOX 123 Senior Technical Officer / \ BROADWAY NSW Computer Systems Group \_.--._* AUSTRALIA 2007 School of Electrical Engineering v FAX: 61 2 330-2435 UNIVERSITY OF TECHNOLOGY, SYDNEY PH: 61 2 330-2382 +++++++++++++++++++++++++++ From: russotto@eng.umd.edu (Matthew T. Russotto) Date: Tue, 14 Apr 92 15:06:27 GMT Organization: College of Engineering, University of Maryland, College Park In article <james.703208470@ee.uts.EDU.AU> james@ee.uts.edu.au (A. James Boswell) writes: > >Hello, >Can anyone help me with info about compiling for non Mac 68K based >systems using ThinkC 5.0 or a C++ compiler? I own ThinkC 5.0 and I have >to write some code for a 68332 based robot. (68332 is a superset of >68K with some 020 instructions). > >My (many) questions are these : > >Is there a utility for stripping CODE resources of JUMP tables, and >locating code at a specific address (say for moving code to a ROM)? Under THINK C, compile as a code resource with custom headers-- this should make pure code, with none of the header stuff. I'm fairly sure this will even be loadable to ROM. THINK C applications are not, as they use installation code to fix some references. Don't use any globals-- you will have to handle them yourself. >Is there a way to ensure that no system (OS, ROM or otherwise) code is >called when Think C compiles it? Don't make any trap calls, and don't include any libraries. Also, don't use floating point. I'm 99% sure that will do it. If you want to use MPW, see Apple tech Note 240-- it has all sorts of info on the pitfalls of using MPW to make standalone code. - -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu Some news readers expect "Disclaimer:" here. Just say NO to police searches and seizures. Make them use force. (not responsible for bodily harm resulting from following above advice) +++++++++++++++++++++++++++ From: aw0g+@andrew.cmu.edu (Aaron Wohl) Date: 14 Apr 92 08:57:37 GMT Organization: Special Projects, Carnegie Mellon, Pittsburgh, PA Make a single segment code resource with the custom header checkbox set. It is ok to use globals, but any entry points you will need to to a lea a4,main to setup the register to point to the globals. The globals are mixed in with the code so you might have a problem if the hardware wants to write protect the code. You can't take the address of a variable inside a data declation (eg a staticly initialized array containing pointers to routines) the compiler will give an error. Don't load mactraps or mactraps2. It is ok to use some of the library routines, add the .c files one at a time as needed for things like memcpy, ctype. Aaron --------------------------- Subject: FAQ index ? From: jordi@sc2a.unige.ch Date: 14 Apr 92 09:59:15 +0200 Organization: University of Geneva, Switzerland Hi ! I would like to know if there is a FAQ index somewhere ? Thanks for any help .... Sincerely, Steve Jordi +-------------------------+----------------------------------------------+ | Dpt of Geophysics | Fax: + 41 22 205-732 | | University of Geneva | | | 13, Rue des Maraichers | E-Mail: Internet: jordi@sc2a.unige.ch | | 1211 GENEVA 4 | Bitnet: jordi@cgeuge52.bitnet | | Switzerland | Compuserve: 70143,3056 (once a week) | +-------------------------+----------------------------------------------+ --------------------------- From: michel@cst02.segin.fr (Michel Pollet) Subject: How about powerbook's interrupt&reset KEYS Date: 1 Apr 92 23:01:11 GMT Organization: Groupe Axime Well, nice, all works fine with this pretty PB140, but the so used int&reset keys are so little that you have to use a pen to push them.. And no 'power' key, so there no way to uses Programmer's key.. Someone came with a solution ? Michel - -- - - Michel Pollet - - --michel%segin4.segin.fr@relay.prime.com (Office), michel@trantor.uucp (Home)-- - - Nothing is ever accomplished by a reasonable man. -- +++++++++++++++++++++++++++ From: russotto@eng.umd.edu (Matthew T. Russotto) Date: Thu, 02 Apr 92 18:43:53 GMT Organization: College of Engineering, University of Maryland, College Park In article <michel.702169271@cst02> michel%cst02.segin.fr@relay.prime.com (Michel Pollet) writes: > > Well, nice, all works fine with this pretty PB140, but the > so used int&reset keys are so little that you have to use a pen > to push them.. > And no 'power' key, so there no way to uses Programmer's key.. > > Someone came with a solution ? Yes, I modified the code in Programmer's Key which checks for the ROM code of the Mac Portable, and changed it to check for the ROM code of the PB170. You could do the same with the PB140 code. - -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu Some news readers expect "Disclaimer:" here. Just say NO to police searches and seizures. Make them use force. (not responsible for bodily harm resulting from following above advice) +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 11 Apr 92 17:06:56 GMT Organization: MacDTS Mongols In article <1992Apr02.184353.28030@eng.umd.edu>, russotto@eng.umd.edu (Matthew T. Russotto) writes: > > In article <michel.702169271@cst02> michel%cst02.segin.fr@relay.prime.com (Michel Pollet) writes: > > > > Well, nice, all works fine with this pretty PB140, but the > > so used int&reset keys are so little that you have to use a pen > > to push them.. > > And no 'power' key, so there no way to uses Programmer's key.. > > > > Someone came with a solution ? > > Yes, I modified the code in Programmer's Key which checks for the ROM > code of the Mac Portable, and changed it to check for the ROM code of > the PB170. You could do the same with the PB140 code. Programmer's Key 1.4.1 works with powerbooks. Regards, Kent Sandvik --------------------------- From: mshields@jgravesnext.nurs.utah.edu (Mike Shields) Subject: How to write a WDEF Date: 2 Apr 92 21:01:40 GMT Organization: University of Utah Computer Center Can anyone point me in a direction which will give me some help in getting going on writing a WDEF. Is it in IM anywhere. I'm at work and came up with a WDEF I want to do and don't have IM here. Also, if I wanted to add it to the system, ala AltWDEF, how would I go about this?? Thanks, Mike - -- # Mike Shields | REPLY TO -> # Research Assistant | mshields@peruvian.utah.edu # U of Utah. College of Nursing | mshields@jgravesnext.nurs.utah.edu #include <stddisclaimer.h> | ^^ This one is NeXTmail. +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 11 Apr 92 17:10:52 GMT Organization: MacDTS Mongols In article <1992Apr2.210140.4369@fcom.cc.utah.edu>, mshields@jgravesnext.nurs.utah.edu (Mike Shields) writes: > > > Can anyone point me in a direction which will give me some help in getting > going on writing a WDEF. Is it in IM anywhere. I'm at work and came up with a > WDEF I want to do and don't have IM here. Also, if I wanted to add it to the > system, ala AltWDEF, how would I go about this?? Some information is in the IM, developer CDs have the System 6 WDEF, and TN 298 talks about the System 7 Window colorization. Also, MacApp has the HyperCard floating window WDEF sources so you could use those for whatever you want. I guess old MacTutor articles also talks about WDEF hacking. Regards, Kent Sandvik --------------------------- From: spud@Apple.COM (Dave "Spud" Kalin) Subject: Comparing APPLs and BPPLs Date: 3 Apr 92 23:09:42 GMT Organization: Apple Computer Inc., Cupertino, CA Someone told me that there is a file type BPPL which denotes a background application (such as the old Backgrounder). However, when I use ResEdit to change an app from APPL to BPPL, the program still runs perfectly, even in the foreground. So what the heck is a BPPL program, anyway? Is there any difference between an APPL and a BPPL? I can't seem to find any documentation on this phenomenon anywhere. Thanks in advance. Dave Kalin spud@apple.com - -- * *** *** Dave Kalin (spud@apple.com) ******* Apple Computer, Inc. ******* ******* "Changing the world, one layoff at a time." ** ** +++++++++++++++++++++++++++ From: strong@apple.com (Bob Strong) Date: 13 Apr 92 20:59:11 GMT Organization: Apple Computer, Inc. In article <64786@apple.Apple.COM>, spud@Apple.COM (Dave "Spud" Kalin) writes: > > Someone told me that there is a file type BPPL which denotes a background > application (such as the old Backgrounder). Try "appe". +++++++++++++++++++++++++++ From: strong@apple.com (Bob Strong) Date: 13 Apr 92 21:01:22 GMT Organization: Apple Computer, Inc. In article <64786@apple.Apple.COM>, spud@Apple.COM (Dave "Spud" Kalin) writes: > > Someone told me that there is a file type BPPL which denotes a background > application (such as the old Backgrounder). Try "appe". --------------------------- From: howard@rigel.cs.pdx.edu (howard l. berkey) Subject: discipline Date: 4 Apr 92 18:26:44 GMT Hi! What exactly does discipline do for macsbug and where can I get info on it? Thanks in advance, -Howard I can't think of anything more politically correct than assasination...:) Segmentation Fault (core dumped) +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 10 Apr 92 01:37:09 GMT Organization: MacDTS Mongols In article <5242@pdxgate.UUCP>, howard@rigel.cs.pdx.edu (howard l. berkey) writes: > Hi! > What exactly does discipline do for macsbug and where can I get info > on it? It's an Apple provided tool which checks parameters sent in and out from traps, kicking and screaming if they are the wrong ones. It's available on the ETO CDs and I think it's a product from APDA, but I'm not 100% sure. Cheers, Kent Sandvik Dynamic Language, eh, Dynamic Language Maniac > I can't think of anything more politically correct than assasination...:) What about castration? +++++++++++++++++++++++++++ From: edw@caligula.cts.com (Ed Watkeys) Date: 10 Apr 92 18:55:09 GMT Organization: Guerrilla Networking Project In article <22811@goofy.Apple.COM> (comp.sys.mac.programmer), ksand@apple.com (Kent Sandvik) writes: > In article <5242@pdxgate.UUCP>, howard@rigel.cs.pdx.edu (howard l. berkey) > writes: > > > Hi! > > What exactly does discipline do for macsbug and where can I get info > > on it? > > It's an Apple provided tool which checks parameters sent in and out from > traps, kicking and screaming if they are the wrong ones. It's available > on the ETO CDs and I think it's a product from APDA, but I'm not 100% sure. > > Cheers, > Kent Sandvik > Or, you can get it by getting _MacsBug Reference and Debugging Guide_ -- you can get the book with a floppy that includes MacsBug and Discipline. Ed - -- Ed Watkeys (Drexel U. Comp Sci) "...if you wish to strive for peace edw@caligula.cts.com of soul and pleasure, then believe; edw%caligula@phlpa.pha.pa.us if you wish to be a devotee of truth, ls.com!phlpa!caligula!edw then inquire...." -- Nietzsche +++++++++++++++++++++++++++ From: mhall@occs.cs.oberlin.edu (Matthew Hall) Organization: Oberlin College Computer Science Date: Tue, 14 Apr 1992 19:12:56 GMT Hello. I have discipline, I know what it does, and I would really like to use it. Problem is, it won't let me. I stick it in my sytem folder, reboot as normal, (Get debugger installed message for Macsbug, inits march along the bottom of my screen) and then a funny box comes up saying 'Discipline - Debugger not installed' which is rather curious since 5 seconds ago, my computer told me a debugger was installed. I am running a mac LC, 4 meg, sys 6.0.7 multifinder (though discipline doesn't work with sys7 on my computer, 32 or 24 bit adressing. Yes, I removed sys7 from my computer in an act of defiance) and FPU. Please help me. Matthew Hall - -- - ------------------------------------------------------------------------------- Matt Hall. mhall@occs.cs.edu OR SMH9666@OBERLIN.BITNET (216)-775-5805 (That's a Cleveland Area code. Lucky Me) "If a man comes up to you and says: 'A dog just carried away your ear.' Do you run after the dog, or search first for your ear?" - Moon over Morocco --------------------------- From: resnick@cogsci.uiuc.edu (Pete Resnick) Subject: MacTCP - UDPRead aligned? Organization: University of Illinois at Urbana Date: Sat, 4 Apr 1992 23:21:23 GMT Another hopefully easy question for the MacTCP programming gods: Am I guaranteed that the data pointed to by the rcvBuff that I get from a UDPRead call is aligned so that I can do a MOVE.L from it? Or am I not guaranteed of alignment? Thanks, pr - -- Pete Resnick (...so what is a mojo, and why would one be rising?) Graduate assistant - Philosophy Department, Gregory Hall, UIUC System manager - Cognitive Science Group, Beckman Institute, UIUC Internet: resnick@cogsci.uiuc.edu +++++++++++++++++++++++++++ From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Date: 6 Apr 92 14:59:21 GMT Organization: University of Illinois at Urbana-Champaign resnick@cogsci.uiuc.edu (Pete Resnick) writes: >Am I guaranteed that the data pointed to by the rcvBuff that I get >from a UDPRead call is aligned so that I can do a MOVE.L from it? Why not just use BlockMove? Unless you're going to be doing scads and scads of little tiny moves, BlockMove will do a fine job, without compatibility problems. And you could even get the trap address and avoid trap overhead, if you want to. - -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner +++++++++++++++++++++++++++ From: dorner@pequod.cso.uiuc.edu (Steve Dorner) Date: 6 Apr 92 14:59:21 GMT Organization: University of Illinois at Urbana-Champaign resnick@cogsci.uiuc.edu (Pete Resnick) writes: >Am I guaranteed that the data pointed to by the rcvBuff that I get >from a UDPRead call is aligned so that I can do a MOVE.L from it? Why not just use BlockMove? Unless you're going to be doing scads and scads of little tiny moves, BlockMove will do a fine job, without compatibility problems. And you could even get the trap address and avoid trap overhead, if you want to. - -- Steve Dorner, U of Illinois Computing Services Office Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner +++++++++++++++++++++++++++ From: tom@wcc.oz.au (Tom Evans) Date: 10 Apr 92 01:37:12 GMT Organization: Webster Computer Corp, Melbourne, Australia In article <1992Apr6.145921.26924@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: > resnick@cogsci.uiuc.edu (Pete Resnick) writes: > >Am I guaranteed that the data pointed to by the rcvBuff that I get > >from a UDPRead call is aligned so that I can do a MOVE.L from it? Has the block come through a dumb Ethernet card, an A-ROSE Ethernet card, Token Ring or LocalTalk? Even EtherTalk Phase 1 and EtherTalk Phase 2 are misaligned by one byte (you can have IP-in-MacIP-in-EtherTalk). You can't tell - don't take the risk. > Why not just use BlockMove? Even something as trivially simple as: char *p, *q; while (n--) *(q++) = *(p++); is faster than BlockMove for n < 50 - even as a subroutine! Therefore checking for word-alignment and doing long-copies in a subroutine is going to be faster for n < 200 or so. Using proper unrolled assembly code is always going to be faster (because that's what BlockMove() is probably doing). Your mileage may vary. ======================== Tom Evans tom@wcc.oz.au Webster Computer Corp P/L, 1270 Ferntree Gully Rd Scoresby, Melbourne 3179 Victoria, Australia 61-3-764-1100 FAX ...764-1179 A.C.N. 004 818 455 +++++++++++++++++++++++++++ From: dstine@cisco.com (David S.A. Stine) Date: 12 Apr 92 06:14:45 GMT Organization: cisco Systems, Menlo Park, California, USA In article <2452@wcc.oz.au> tom@wcc.oz.au (Tom Evans) writes: >In article <1992Apr6.145921.26924@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: >> resnick@cogsci.uiuc.edu (Pete Resnick) writes: >> Why not just use BlockMove? > >Even something as trivially simple as: > > char *p, *q; > while (n--) > *(q++) = *(p++); > >is faster than BlockMove for n < 50 - even as a subroutine! Yes. A friend did a study of this and came up with a break-even point of about 32 to 34 bytes for a byte-copy loop, about 50 bytes for an unrolled byte-copy loop. And by grabbing the address of BlockMove (to avoid trap dispatch overhead) things got faster still. >Therefore checking for word-alignment and doing long-copies in a >subroutine is going to be faster for n < 200 or so. Using proper >unrolled assembly code is always going to be faster (because that's >what BlockMove() is probably doing). BlockMove does something very close to this. Break out MacNosy to see for yourself. dsa +++++++++++++++++++++++++++ From: Joe.Francis@dartmouth.edu (Joe Francis) Date: 12 Apr 92 23:01:29 GMT Organization: Dartmouth College, Hanover, NH In article <2452@wcc.oz.au> tom@wcc.oz.au (Tom Evans) writes: > ...is faster than BlockMove for n < 50 - even as a subroutine! > Therefore checking for word-alignment and doing long-copies in a > subroutine is going to be faster for n < 200 or so. Using proper > unrolled assembly code is always going to be faster (because that's > what BlockMove() is probably doing). Don't forget that some macs can execute ROM faster than RAM. +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 11 Apr 92 16:54:54 GMT Organization: MacDTS Mongols In article <2452@wcc.oz.au>, tom@wcc.oz.au (Tom Evans) writes: > > In article <1992Apr6.145921.26924@ux1.cso.uiuc.edu>, dorner@pequod.cso.uiuc.edu (Steve Dorner) writes: > > Why not just use BlockMove? > > Even something as trivially simple as: > > char *p, *q; > while (n--) > *(q++) = *(p++); > > is faster than BlockMove for n < 50 - even as a subroutine! > Therefore checking for word-alignment and doing long-copies in a > subroutine is going to be faster for n < 200 or so. Using proper > unrolled assembly code is always going to be faster (because that's > what BlockMove() is probably doing). BlockMove is a trap (0xA02E) while the construct above executes directly in memory. Any code causing a dispatch will always execute slower than pure RAM resident constructs. Cheers, Kent Sandvik/DTS --------------------------- From: chaoyang@sal-sun71.usc.edu (Chao Yang) Subject: Dithering Palette Date: 5 Apr 92 00:44:26 GMT Organization: University of Southern California, Los Angeles, CA How do you dither a picture without redraw the picture (or painting) again? Like in C, I use palette manager and color quick draw paint several colors, how do you change certain colors to another specific colors you want without reploting or redrawing? e.g. all Blue colors --> white colors. Please indicate what function or routine should I use. Thanks a lot. +++++++++++++++++++++++++++ From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser) Date: 13 Apr 92 04:12:51 GMT Organization: MacDTS, Apple Computer In article <ktsjbaINN9pl@sal-sun71.usc.edu>, chaoyang@sal-sun71.usc.edu (Chao Yang) writes: > How do you dither a picture without redraw the picture (or painting) again? > Like in C, I use palette manager and color quick draw paint several colors, > how do you change certain colors to another specific colors you want without > reploting or redrawing? e.g. all Blue colors --> white colors. Please > indicate what function or routine should I use. Thanks a lot. First, in the future please try to insert hard carriage returns so your post will wrap onto multiple lines, for those of us using news readers which require this. What you want to do is called palette animation; on an indexed device (1-8 bits, 2-256 colors) it allows you to instantly change an index from one color to another, changing all the instances of that color on the screen. It's a little too complex to describe well in this message, so I'll refer you to Inside Macintosh; IM V,pg 156, or IM VI, pg 20-10 should get you started; best of luck. Tim Dierks MacDTS, but not nearly as Ren & Stimpy mad as Kent. --------------------------- Organization: Queen's University at Kingston Date: Sunday, 5 Apr 1992 23:29:52 EDT From: <CHARLESW@QUCDN.QueensU.CA> Subject: How about C.S.M.P on CD-ROM? Like many people who follow CSMP I keep my own little archives of things I think will be useful some day--bits of code, bugs and pitfalls, and corres- pondence on all those things I hope to have time to delve into some day. And, whenever I run into an area I'm struggling over, I scan the last year or so of my archives using Gopher. Often I find useful things. Of course 90% of what I save probably never gets used, but who can tell in advance. Has anyone proposed making CSMP available periodically on CD-ROM, say with On Location index files? I'm assuming, of course, that CSMP is essentially a large community conversation where all participants are aware that their comments are broadcast, and so moving the notes to a different medium wouldn't require copyright releases from everyone who even said "This is a test...". CD-ROM production prices are reasonable, CD-ROM players are becoming plentiful (now that I have one :-), and the overhead might be low enough for it to fly. What do people think? Would a semi-annual CD-ROM be worth ten or fifteen bucks or would it already be too stale? .../Dave Dave Charlesworth +++++++++++++++++++++++++++ From: pasek@npdiss1.StPaul.NCR.COM (Michael A. Pasek) Date: 7 Apr 92 16:18:53 GMT Organization: NCR NPG - St. Paul In article <92096.232952CHARLESW@QUCDN.QueensU.CA> CHARLESW@QUCDN.QueensU.CA writes: >[some stuff deleted] > Has anyone proposed making CSMP available periodically on CD-ROM, say with >On Location index files? [more stuff deleted] > What do people think? Would a semi-annual CD-ROM be worth ten or fifteen >bucks or would it already be too stale? I think this would be an excellent idea, but rather than just a compendium of C.S.M.P. as it appeared on USENET, why not have the articles grouped by subject (ala C.S.M.P. Digest) ? On the other hand, there is already a company that is planning to issue CD-ROMs containing _all_ USENET news. It's called NetNews/CD, and they are supposed to start shipping CD-ROMs in ISO9660 format (with a Mac reader) sometime this month. Personally, I'd probably prefer one that had _only_ C.S.M.P., with probably some of the other Mac-specific newsgroups (e.g., c.s.m.system, c.s.m.hardware, comp.protocols.appletalk, etc.). M. A. Pasek Software Support NCR NPG (612) 638-7668 Development Support 2700 N. Snelling Ave. pasek@ncrons.StPaul.NCR.COM Roseville, MN 55113 +++++++++++++++++++++++++++ From: kent@sparky.imd.sterling.com (Kent Landfield) Date: 8 Apr 92 21:53:19 GMT Organization: Sterling Software In article <1417@npdiss1.StPaul.NCR.COM> pasek@ncrons.StPaul.NCR.COM (Mike Pasek) writes: >In article <92096.232952CHARLESW@QUCDN.QueensU.CA> CHARLESW@QUCDN.QueensU.CA writes: >>[some stuff deleted] >> Has anyone proposed making CSMP available periodically on CD-ROM, say with >>On Location index files? [more stuff deleted] >> What do people think? Would a semi-annual CD-ROM be worth ten or fifteen >>bucks or would it already be too stale? If you think that you can pay for all your production costs selling a CD-ROM for ten or fifteen bucks, I will be in line to buy one... :-) >On the other hand, there is already a company that is planning to issue CD-ROMs >containing _all_ USENET news. It's called NetNews/CD, and they are supposed >to start shipping CD-ROMs in ISO9660 format (with a Mac reader) sometime this >month. Sterling Software has been shipping USENET News on CD-ROM since the first of the year in Sun UFS format. We are in the final stages of preparation for producing an ISO 9660 format version. (News doesn't fit real well into the ISO 9660 format...) The Mac reader is a problem in that the only version with sources we have been able to aquire is NewsWatcher. It has limitations in that it uses the list manager for displaying newsgroups. Newswatcher can't handle the 1800 to 2500 newsgroups which are on the CD-ROMs each issue... :-( We are trying to work around it but it has not been as easy a process as it initially appeared. (It never is...) Because of that we do not expect to be shipping a Mac reader until May. If someone has other Mac readers for which they can supply sources please contact me and maybe we can speed up the availability of the Mac readers. >Personally, I'd probably prefer one that had _only_ C.S.M.P., with probably >some of the other Mac-specific newsgroups (e.g., c.s.m.system, c.s.m.hardware, >comp.protocols.appletalk, etc.). We are planning on producing specialized yearly series CD-ROMs. The Mac groups were one we had considered. If you are interested in seeing us do that please send email to cdnews@sterling.com and let us know. More information on the service and its directions can be found by sending email to cdnews@sterling.com or via anonymous ftp from ftp.uu.net in the directory ~/vendors/sterling. -Kent+ - --- Kent Landfield INTERNET: kent@IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net. +++++++++++++++++++++++++++ From: caruso@gbi01.enet.dec.com (Angelo Caruso) Date: 9 Apr 92 22:51:39 GMT Organization: Digital Equipment Corporation In article <92096.232952CHARLESW@QUCDN.QueensU.CA>, <CHARLESW@QUCDN.QueensU.CA> writes... > Like many people who follow CSMP I keep my own little archives of things >I think will be useful some day--bits of code, bugs and pitfalls, and corres- >pondence on all those things I hope to have time to delve into some day. >And, whenever I run into an area I'm struggling over, I scan the last year or >so of my archives using Gopher. Often I find useful things. Of course 90% >of what I save probably never gets used, but who can tell in advance. > > Has anyone proposed making CSMP available periodically on CD-ROM, say with >On Location index files? I'm assuming, of course, that CSMP is essentially >a large community conversation where all participants are aware that their >comments are broadcast, and so moving the notes to a different medium wouldn't >require copyright releases from everyone who even said "This is a test...". >CD-ROM production prices are reasonable, CD-ROM players are becoming plentiful >(now that I have one :-), and the overhead might be low enough for it to fly. > > What do people think? Would a semi-annual CD-ROM be worth ten or fifteen >bucks or would it already be too stale? > >..../Dave Dave Charlesworth I'd subscribe to it immediately !!! Angelo. +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 14 Apr 92 19:16:23 GMT Organization: MacDTS Mongols In article <1417@npdiss1.StPaul.NCR.COM>, pasek@npdiss1.StPaul.NCR.COM (Michael A. Pasek) writes: > Personally, I'd probably prefer one that had _only_ C.S.M.P., with probably > some of the other Mac-specific newsgroups (e.g., c.s.m.system, c.s.m.hardware, > comp.protocols.appletalk, etc.). Another issue would be a form of intelligent editing of the contents, so we would have a better format for browsing and searching. It's a huge task, though. Cheers, Kent --------------------------- Subject: LISP and DrawString questions From: myers@wittenberg.edu Date: 6 Apr 92 12:35:23 -0400 Organization: Wittenberg University I asked both of these questions before but I never received any answers because the newsfeed here went down for 5 days and we missed all those messages. First: I'm looking for a public domain version of LISP. Does anybody know of one (if so, where can I get hold of it)? Second: I want to draw white text on a black background and everything I display using DrawString just appears as black (which is no good since that is the same color as the background!). I've tried changing the PenPat, but that doesn't work. Thanks! Altan Stalker Wittenberg University MYERS@WITTENBERG.EDU +++++++++++++++++++++++++++ From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy) Organization: Kalamazoo College Date: Tue, 7 Apr 1992 14:44:04 GMT myers@wittenberg.edu writes: > >First: I'm looking for a public domain version of LISP. Does anybody know of >one (if so, where can I get hold of it)? Is this on the FAQ list? Eric Sink posted a list of free/shareware compilers a while back; I think that belongs in the FAQ. I don't know of a LISP, but there's a decent Scheme at sumex-aim.stanford.edu. >Second: I want to draw white text on a black background and everything I >display using DrawString just appears as black (which is no good since that is >the same color as the background!). I've tried changing the PenPat, but that >doesn't work. There are two schools of thought, I believe. The first method is to change the PenPat and make sure you're using TextMode(srcCopy). The default mode is srcOr, and or'ing white won't do a thing. The second is to draw in TextFace(outline), again with srcCopy. There really isn't any reason to do the second (unless you're sloppy and are likely to forget to change the PenPat back to something reasonable), but it's a handy trick to know when you're using stupid graphics programs that won't let you do text white-on-black. - -- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy "Almost all portables today employ passive-matrix LCDs, and no one expects active-matrix screens to be cost-competitive for a few years" -PC World 2/92 +++++++++++++++++++++++++++ From: d88-jwa@byse.nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Date: Tue, 7 Apr 1992 19:21:04 GMT .edu> myers@wittenberg.edu writes: First: I'm looking for a public domain version of LISP. Does anybody know of one (if so, where can I get hold of it)? There's a nice LISP called "SIOD" short for Scheme In One Defun. Check for it with archie. Second: I want to draw white text on a black background and everything I display using DrawString just appears as black (which is no good since that is the same color as the background!). I've tried changing the PenPat, but that doesn't work. Text drawing uses CopyBits; you'd have to use a TextMode ( patXor ) or TextMode ( patBic ) - -- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT! +++++++++++++++++++++++++++ From: d88-jwa@byse.nada.kth.se (Jon W{tte) Organization: Royal Institute of Technology, Stockholm, Sweden Date: Tue, 7 Apr 1992 19:22:22 GMT .edu> myers@wittenberg.edu writes: First: I'm looking for a public domain version of LISP. Does anybody know of one (if so, where can I get hold of it)? There's a nice LISP called "SIOD" short for Scheme In One Defun. Check for it with archie. Second: I want to draw white text on a black background and everything I display using DrawString just appears as black (which is no good since that is the same color as the background!). I've tried changing the PenPat, but that doesn't work. Text drawing uses CopyBits; you'd have to use a TextMode ( srcXor ) or ^^^^^^ TextMode ( srcBic ) ^^^^^^ I made an error... using patXxx where srcXxx is appropriate is a good way of making things invisible on SEs and earlier machines. - -- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT! +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 14 Apr 92 19:24:43 GMT Organization: MacDTS Mongols In article <1992Apr6.123523.1@wittenberg.edu>, myers@wittenberg.edu writes: > > I asked both of these questions before but I never received any answers because > the newsfeed here went down for 5 days and we missed all those messages. > > First: I'm looking for a public domain version of LISP. Does anybody know of > one (if so, where can I get hold of it)? Check comp.lang.lisp now and then for their FAQ, it should have a list of known PD LISP systems running under MacOS, including ftp addresses. As for PD stuff, there are few (any?) Common Lisps which are free that I know of. Our Common Lisp implementation, MCL, costs 495$US, and it's a bargain compared with what you get, CLOS, Mac libraries, most of the stuff you need in the LISP world. Similar Windows packages are usually 5000$US upwards (development environment). Cheers, Kent Sandvik Dynamic Language Believer --------------------------- From: louis@asterix.drev.dnd.ca (Louis Demers) Subject: Cdent, where do I find it ? Date: 7 Apr 92 13:58:14 GMT Organization: Defence Research Establishment Valcartier Hi, In the documentation of MPW, there a references to a shell variable that contains the options for a C++ beautifier. How can I get this beautifier ? Louis - -- | Louis Demers | DREV, Defence Research Establishment,Valcartier | | louis@asterix.drev.dnd.ca | POBox 8800, Courcelette,Quebec, CANADA, G0A 1R0 | | (131.132.48.2) | Office: (418) 844-4424 fax (418) 844-4511 | +---------------------------+-------------------------------------------------+ +++++++++++++++++++++++++++ From: ksand@apple.com (Kent Sandvik) Date: 14 Apr 92 19:29:14 GMT Organization: MacDTS Mongols In article <1992Apr7.135814.10598@asterix.drev.dnd.ca>, louis@asterix.drev.dnd.ca (Louis Demers) writes: > > Hi, > > In the documentation of MPW, there a references to a shell variable > that contains the options for a C++ beautifier. How can I get this > beautifier ? What I know it's one of the few *Apple internal* tools, so we can't release it. I guess I could ask if we could send it out as an alpha tool. Cheers, Kent PS: Yes, I'm nowadays using it a lot from MPW, makes my ugly indentation look better. --------------------------- From: gerson@parc.xerox.com (Dan Gerson) Subject: Silly question about determining DirIDs Date: 8 Apr 92 23:18:21 GMT Organization: Xerox PARC, Palo Alto, CA This seems like it should be obvious, so I'm afraid that I'm asking a stupid question, but how do you find out the DirID of a directory? In particular, I have an alias record to a directory which I've extracted from a database. I then resolve the alias into an FSSpec, and then want to create new files in the named directory. I assumed that the best way to do this was to call FSMakeFSSpec for the VRefNum,DirID,and new file name, followed by an FSpCreate. However, I can't seem to figure out how to get the DirID given an FSSpec. I tried (in C++ MacApp code where fAlias is an AliasHandle): OSErr err; FSSpec dirspec; Boolean changed; err = ResolveAlias(NULL,fAlias,dirspec,changed); FailOSErr(err); // To simplify the example... HParamBlockRec info; CStr255 name = dirspec.name; info.fileParam.ioCompletion = NULL; info.fileParam.ioNamePtr = name; info.fileParam.ioVRefNum = dirspec.vRefNum; info.fileParam.ioFDirIndex = 0; info.fileParam.ioDirID = dirspec.parID; info.fileParam.ioFVersNum = 0; // Just for grins err = PBHGetFInfo(&info,FALSE); FailOSErr(err); fDirID = info.fileParam.ioDirID; but fDirID is always the DirID of the aliases parent, not of the named directory. Just for completeness, in case the problem is actually with the alias itself, it was created with: OSErr err; FSSpec dirspec; err = FSMakeFSSpec(NULL,NULL,"Oracle:ClipBin:",&dirspec); FailOSErr(err); // Get an alias record to the bin's directory AliasHandle alias; err = NewAlias(NULL,dirspec,alias); FailOSErr(err); FailNIL(alias); // Not sure if this is necessary fAlias = alias; What am I doing wrong? I'm more interested in what's the right way to accomplish my higher level goal (of storing alias records to directories in some database which I can later use to specify where I should create data files (in particular QuickTime movies)). Thanks. - -- Dan Gerson gerson@parc.xerox.com Xerox Palo Alto Research Center 415-494-4745 3333 Coyote Hill Road Palo Alto, CA 94304 USA +++++++++++++++++++++++++++ From: d88-jwa@hemul.nada.kth.se (Jon W{tte) Date: 9 Apr 92 20:47:49 GMT Organization: Royal Institute of Technology, Stockholm, Sweden .xerox.com> gerson@parc.xerox.com (Dan Gerson) writes: This seems like it should be obvious, so I'm afraid that I'm asking a stupid question, but how do you find out the DirID of a directory? HParamBlockRec info; CStr255 name = dirspec.name; You can't copy strings this way in C... Three weeks ago I posted these, and here we go again: long GetDirID ( FSSpec * fss ) { CInfoPBRec pb ; BlockClear ( & pb , sizeof ( pb ) ) ; pb . dirInfo . ioVRefNum = fss -> vRefNum ; pb . dirInfo . ioDrDirID = fss -> parID ; pb . dirInfo . ioNamePtr = fss -> name ; FailOSErr ( PBGetCatInfo ( & pb , 0 ) ) ; ASSERT ( pb . hFileInfo . ioFlAttrib & 0x10 ) ; return pb . dirInfo . ioDrDirID ; } OSErr GetDirName ( short vol , long dir , unsigned char * name ) { CInfoPBRec pb ; BlockClear ( & pb , sizeof ( pb ) ) ; pb . hFileInfo . ioFDirIndex = -1 ; pb . hFileInfo . ioDirID = dir ; pb . hFileInfo . ioVRefNum = vol ; pb . hFileInfo . ioNamePtr = name ; return PBGetCatInfo ( & pb , 0 ) ; } - -- h+@nada.kth.se; Jon W{tte, the Diplomat - NOT! +++++++++++++++++++++++++++ From: dn5@apix.psu.edu (D. Jay Newman) Date: 10 Apr 92 20:50:15 GMT Organization: Penn State In article <D88-JWA.92Apr9214749@hemul.nada.kth.se>, d88-jwa@hemul.nada.kth.se (Jon W{tte) writes: > > .xerox.com> gerson@parc.xerox.com (Dan Gerson) writes: > HParamBlockRec info; > CStr255 name = dirspec.name; > > You can't copy strings this way in C... Sorry, Jon, but while you can't copy strings in C that way, you can copy them in C++ using the CStr255 class (which is defined in some MacApp headers). I think that they will eventually be part of the normal MPW C++ distribution. They certainly make *my* life easier. ()()()()()()()()()()()()() CBEL--Teaching & Learning Technologies ()()() D. Jay Newman ! Save the whales dn5@psuvm.psu.edu ! (Collect the whole set) dn5@apix.psu.edu ! --------------------------- End of C.S.M.P. Digest **********************